<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim MM_editAction MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString) End If ' boolean to abort record edit Dim MM_abortEdit MM_abortEdit = false %> <% ' IIf implementation Function MM_IIf(condition, ifTrue, ifFalse) If condition = "" Then MM_IIf = ifFalse Else MM_IIf = ifTrue End If End Function %> <% If (CStr(Request("MM_update")) = "form2") Then If (Not MM_abortEdit) Then ' execute the update Dim MM_editCmd Set MM_editCmd = Server.CreateObject ("ADODB.Command") MM_editCmd.ActiveConnection = MM_AdminDataSource_STRING MM_editCmd.CommandText = "UPDATE dbo.Listings SET Companyname = ?, ADINo = ?, Website = ?, Mobile = ?, Tel = ?, Email = ?, imageurl = ?, [Description] = ?, County = ?, PrimaryAreas = ?, sponsored = ?, type = ?, active = ? WHERE listingid = ?" MM_editCmd.Prepared = true MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, 60, Request.Form("Companyname")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, 10, Request.Form("ADINo")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 201, 1, 100, Request.Form("Website")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 201, 1, 50, Request.Form("Mobile")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 201, 1, 50, Request.Form("Tel")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 201, 1, 70, Request.Form("Email")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 201, 1, 100, Request.Form("imageurl")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 201, 1, 400, Request.Form("Description")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 201, 1, 300, Request.Form("County")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 201, 1, 400, Request.Form("PrimaryAreas")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 5, 1, -1, MM_IIF(Request.Form("sponsored"), Request.Form("sponsored"), null)) ' adDouble MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param12", 201, 1, 20, Request.Form("type")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param13", 201, 1, 1, Request.Form("active")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param14", 5, 1, -1, MM_IIF(Request.Form("MM_recordId"), Request.Form("MM_recordId"), null)) ' adDouble MM_editCmd.Execute MM_editCmd.ActiveConnection.Close ' append the query string to the redirect URL Dim MM_editRedirectUrl MM_editRedirectUrl = "fulllist-lessons.asp" If (Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then MM_editRedirectUrl = MM_editRedirectUrl & "?" Else MM_editRedirectUrl = MM_editRedirectUrl & "&" End If End If Response.Redirect(MM_editRedirectUrl) End If End If %> <% Dim Recordset1__MMid2 Recordset1__MMid2 = "0" If (Request.querystring("id") <> "") Then Recordset1__MMid2 = Request.querystring("id") End If %> <% Dim Recordset1 Dim Recordset1_cmd Dim Recordset1_numRows Set Recordset1_cmd = Server.CreateObject ("ADODB.Command") Recordset1_cmd.ActiveConnection = MM_AdminDataSource_STRING Recordset1_cmd.CommandText = "SELECT * FROM dbo.Listings WHERE listingid=?" Recordset1_cmd.Prepared = true Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 5, 1, -1, Recordset1__MMid2) ' adDouble Set Recordset1 = Recordset1_cmd.Execute Recordset1_numRows = 0 %> Untitled Document

ADD ENRTY

 

Companyname: " size="32">
ADINo: " size="32">
Website: " size="32">
Mobile: " size="32">
Tel: " size="32">
Email: " size="32">
Imageurl: " size="32">
Description:
County:
PrimaryAreas:
Sponsored: " size="32">
Type: " size="32">
Active: " size="32">
 
">

 

<% Recordset1.Close() Set Recordset1 = Nothing %>